//
//  nodeset.h
//  cobalt
//
//  Created by Nicolas Godbout on 2013-08-31.
//  Copyright (c) 2013 Nicolas Godbout. All rights reserved.
//

#ifndef __cobalt__nodeset__
#define __cobalt__nodeset__

#include <set>

#include "node.h"

namespace rdf {
    class NodeSet {
    public:
        Node const& lookupNamedNode(std::string const&) const noexcept;
        Node const& lookupLiteral(std::string const& value,
                                  std::string const& lang,
                                  Node const& datatype) const noexcept;
        void insertNode(Node&&) noexcept;
        
    private:
        static const Node emptyNode;
        
        typedef std::set<Node,Node::lessURI> namedSet_t;
        namedSet_t  namedSet;
        
        typedef std::set<Node,Node::lessLiteral> literalSet_t;
        literalSet_t literalSet;
    };
}

#endif /* defined(__cobalt__nodeset__) */
